import {
    apiGet,
    apiPost,
    apiPut,
    apiDelete
} from '../utils/http/api_function';

/**
 * GET方法
 * @param {json} custom
 * @returns
 */
export const testGet = (custom) => {
    return apiGet('/test', custom);
}

/**
 * GET方法
 * @param {json} custom
 * @returns
 */
export const testGetDetail = (id, custom) => {
    return apiGet('url' + id, {}, custom);
}

/**
 * POST方法
 * @param {json} data
 * @param {json} custom
 * @returns
 */
export const testPost = (data, custom) => {
    return apiPost('url', data, custom);
}

/**
 * PUT方法
 * @param {string} url
 * @param {json} data
 * @param {json} custom
 * @returns
 */
export const testPut = (id, data, custom) => {
    return apiPut('url' + id, data, custom);
}

/**
 * DELETE方法
 * @param {json} custom
 * @returns
 */
export function testDelete(id, custom) {
    return apiDelete('url' + id, custom);
}